home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / rcsintro.z / rcsintro
Text File  |  1998-10-20  |  14KB  |  331 lines

  1.  
  2.  
  3.  
  4. RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))                                                        RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rcsintro - introduction to RCS commands
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The Revision Control System (RCS) manages multiple revisions of files.
  13.      RCS automates the storing, retrieval, logging, identification, and
  14.      merging of revisions.  RCS is useful for text that is revised frequently,
  15.      for example programs, documentation, graphics, papers, and form letters.
  16.  
  17.      The basic user interface is extremely simple.  The novice only needs to
  18.      learn two commands:  cccciiii(1) and ccccoooo(1).  cccciiii, short for "check in", deposits
  19.      the contents of a file into an archival file called an RCS file.  An RCS
  20.      file contains all revisions of a particular file.  ccccoooo, short for "check
  21.      out", retrieves revisions from an RCS file.
  22.  
  23.    FFFFuuuunnnnccccttttiiiioooonnnnssss ooooffff RRRRCCCCSSSS
  24.      +o    Store and retrieve multiple revisions of text.  RCS saves all old
  25.           revisions in a space efficient way.  Changes no longer destroy the
  26.           original, because the previous revisions remain accessible.
  27.           Revisions can be retrieved according to ranges of revision numbers,
  28.           symbolic names, dates, authors, and states.
  29.  
  30.      +o    Maintain a complete history of changes.  RCS logs all changes
  31.           automatically.  Besides the text of each revision, RCS stores the
  32.           author, the date and time of check-in, and a log message summarizing
  33.           the change.  The logging makes it easy to find out what happened to
  34.           a module, without having to compare source listings or having to
  35.           track down colleagues.
  36.  
  37.      +o    Resolve access conflicts.  When two or more programmers wish to
  38.           modify the same revision, RCS alerts the programmers and prevents
  39.           one modification from corrupting the other.
  40.  
  41.      +o    Maintain a tree of revisions.  RCS can maintain separate lines of
  42.           development for each module.  It stores a tree structure that
  43.           represents the ancestral relationships among revisions.
  44.  
  45.      +o    Merge revisions and resolve conflicts.  Two separate lines of
  46.           development of a module can be coalesced by merging.  If the
  47.           revisions to be merged affect the same sections of code, RCS alerts
  48.           the user about the overlapping changes.
  49.  
  50.      +o    Control releases and configurations.  Revisions can be assigned
  51.           symbolic names and marked as released, stable, experimental, etc.
  52.           With these facilities, configurations of modules can be described
  53.           simply and directly.
  54.  
  55.      +o    Automatically identify each revision with name, revision number,
  56.           creation time, author, etc.  The identification is like a stamp that
  57.           can be embedded at an appropriate place in the text of a revision.
  58.           The identification makes it simple to determine which revisions of
  59.           which modules make up a given configuration.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))                                                        RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))
  71.  
  72.  
  73.  
  74.      +o    Minimize secondary storage.  RCS needs little extra space for the
  75.           revisions (only the differences).  If intermediate revisions are
  76.           deleted, the corresponding deltas are compressed accordingly.
  77.  
  78.    GGGGeeeettttttttiiiinnnngggg SSSSttttaaaarrrrtttteeeedddd wwwwiiiitttthhhh RRRRCCCCSSSS
  79.      Suppose you have a file ffff....cccc that you wish to put under control of RCS.
  80.      If you have not already done so, make an RCS directory with the command
  81.  
  82.           mmmmkkkkddddiiiirrrr  RRRRCCCCSSSS
  83.  
  84.      Then invoke the check-in command
  85.  
  86.           cccciiii  ffff....cccc
  87.  
  88.      This command creates an RCS file in the RRRRCCCCSSSS directory, stores ffff....cccc into it
  89.      as revision 1.1, and deletes ffff....cccc.  It also asks you for a description.
  90.      The description should be a synopsis of the contents of the file.  All
  91.      later check-in commands will ask you for a log entry, which should
  92.      summarize the changes that you made.
  93.  
  94.      Files in the RCS directory are called RCS files; the others are called
  95.      working files.  To get back the working file ffff....cccc in the previous example,
  96.      use the check-out command
  97.  
  98.           ccccoooo  ffff....cccc
  99.  
  100.      This command extracts the latest revision from the RCS file and writes it
  101.      into ffff....cccc.  If you want to edit ffff....cccc, you must lock it as you check it out
  102.      with the command
  103.  
  104.           ccccoooo  ----llll  ffff....cccc
  105.  
  106.      You can now edit ffff....cccc.
  107.  
  108.      Suppose after some editing you want to know what changes that you have
  109.      made.  The command
  110.  
  111.           rrrrccccssssddddiiiiffffffff  ffff....cccc
  112.  
  113.      tells you the difference between the most recently checked-in version and
  114.      the working file.  You can check the file back in by invoking
  115.  
  116.           cccciiii  ffff....cccc
  117.  
  118.      This increments the revision number properly.
  119.  
  120.      If cccciiii complains with the message
  121.  
  122.           cccciiii eeeerrrrrrrroooorrrr:::: nnnnoooo lllloooocccckkkk sssseeeetttt bbbbyyyy _y_o_u_r _n_a_m_e
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))                                                        RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))
  137.  
  138.  
  139.  
  140.      then you have tried to check in a file even though you did not lock it
  141.      when you checked it out.  Of course, it is too late now to do the check-
  142.      out with locking, because another check-out would overwrite your
  143.      modifications.  Instead, invoke
  144.  
  145.           rrrrccccssss  ----llll  ffff....cccc
  146.  
  147.      This command will lock the latest revision for you, unless somebody else
  148.      got ahead of you already.  In this case, you'll have to negotiate with
  149.      that person.
  150.  
  151.      Locking assures that you, and only you, can check in the next update, and
  152.      avoids nasty problems if several people work on the same file.  Even if a
  153.      revision is locked, it can still be checked out for reading, compiling,
  154.      etc.  All that locking prevents is a _c_h_e_c_k-_i_n by anybody but the locker.
  155.  
  156.      If your RCS file is private, i.e., if you are the only person who is
  157.      going to deposit revisions into it, strict locking is not needed and you
  158.      can turn it off.  If strict locking is turned off, the owner of the RCS
  159.      file need not have a lock for check-in; all others still do.  Turning
  160.      strict locking off and on is done with the commands
  161.  
  162.           rrrrccccssss  ----UUUU  ffff....cccc     and     rrrrccccssss  ----LLLL  ffff....cccc
  163.  
  164.      If you don't want to clutter your working directory with RCS files,
  165.      create a subdirectory called RRRRCCCCSSSS in your working directory, and move all
  166.      your RCS files there.  RCS commands will look first into that directory
  167.      to find needed files.  All the commands discussed above will still work,
  168.      without any modification.  (Actually, pairs of RCS and working files can
  169.      be specified in three ways:  (a) both are given, (b) only the working
  170.      file is given, (c) only the RCS file is given.  Both RCS and working
  171.      files may have arbitrary path prefixes; RCS commands pair them up
  172.      intelligently.)
  173.  
  174.      To avoid the deletion of the working file during check-in (in case you
  175.      want to continue editing or compiling), invoke
  176.  
  177.           cccciiii  ----llll  ffff....cccc     or     cccciiii  ----uuuu  ffff....cccc
  178.  
  179.      These commands check in ffff....cccc as usual, but perform an implicit check-out.
  180.      The first form also locks the checked in revision, the second one
  181.      doesn't.  Thus, these options save you one check-out operation.  The
  182.      first form is useful if you want to continue editing, the second one if
  183.      you just want to read the file.  Both update the identification markers
  184.      in your working file (see below).
  185.  
  186.      You can give cccciiii the number you want assigned to a checked in revision.
  187.      Assume all your revisions were numbered 1.1, 1.2, 1.3, etc., and you
  188.      would like to start release 2.  The command
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))                                                        RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))
  203.  
  204.  
  205.  
  206.           cccciiii  ----rrrr2222  ffff....cccc     or     cccciiii  ----rrrr2222....1111  ffff....cccc
  207.  
  208.      assigns the number 2.1 to the new revision.  From then on, cccciiii will number
  209.      the subsequent revisions with 2.2, 2.3, etc.  The corresponding ccccoooo
  210.      commands
  211.  
  212.           ccccoooo  ----rrrr2222  ffff....cccc     and     ccccoooo  ----rrrr2222....1111  ffff....cccc
  213.  
  214.      retrieve the latest revision numbered 2._x and the revision 2.1,
  215.      respectively.  ccccoooo without a revision number selects the latest revision
  216.      on the _t_r_u_n_k, i.e. the highest revision with a number consisting of two
  217.      fields.  Numbers with more than two fields are needed for branches.  For
  218.      example, to start a branch at revision 1.3, invoke
  219.  
  220.           cccciiii  ----rrrr1111....3333....1111  ffff....cccc
  221.  
  222.      This command starts a branch numbered 1 at revision 1.3, and assigns the
  223.      number 1.3.1.1 to the new revision.  For more information about branches,
  224.      see rrrrccccssssffffiiiilllleeee(5).
  225.  
  226.    AAAAuuuuttttoooommmmaaaattttiiiicccc IIIIddddeeeennnnttttiiiiffffiiiiccccaaaattttiiiioooonnnn
  227.      RCS can put special strings for identification into your source and
  228.      object code.  To obtain such identification, place the marker
  229.  
  230.           $$$$IIIIdddd$$$$
  231.  
  232.      into your text, for instance inside a comment.  RCS will replace this
  233.      marker with a string of the form
  234.  
  235.           $$$$IIIIdddd::::  _f_i_l_e_n_a_m_e  _r_e_v_i_s_i_o_n  _d_a_t_e  _t_i_m_e  _a_u_t_h_o_r  _s_t_a_t_e  $$$$
  236.  
  237.      With such a marker on the first page of each module, you can always see
  238.      with which revision you are working.  RCS keeps the markers up to date
  239.      automatically.  To propagate the markers into your object code, simply
  240.      put them into literal character strings.  In C, this is done as follows:
  241.  
  242.           ssssttttaaaattttiiiicccc cccchhhhaaaarrrr rrrrccccssssiiiidddd[[[[]]]] ==== """"$$$$IIIIdddd$$$$"""";;;;
  243.  
  244.      The command iiiiddddeeeennnntttt extracts such markers from any file, even object code
  245.      and dumps.  Thus, iiiiddddeeeennnntttt lets you find out which revisions of which
  246.      modules were used in a given program.
  247.  
  248.      You may also find it useful to put the marker $$$$LLLLoooogggg$$$$ into your text,
  249.      inside a comment.  This marker accumulates the log messages that are
  250.      requested during check-in.  Thus, you can maintain the complete history
  251.      of your file directly inside it.  There are several additional
  252.      identification markers; see ccccoooo(1) for details.
  253.  
  254. IIIIDDDDEEEENNNNTTTTIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  255.      Author: Walter F. Tichy.
  256.      Revision Number: 5.7; Release Date: 1998/01/12.
  257.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))                                                        RRRRCCCCSSSSIIIINNNNTTTTRRRROOOO((((1111))))
  269.  
  270.  
  271.  
  272.      Copyright c 1990, 1991, 1992, 1993 by Paul Eggert.
  273.  
  274. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  275.      ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1),
  276.      rlog(1), RCSsource(1)
  277.      Walter F. Tichy, RCS--A System for Version Control, _S_o_f_t_w_a_r_e--_P_r_a_c_t_i_c_e &
  278.      _E_x_p_e_r_i_e_n_c_e 11115555, 7 (July 1985), 637-654.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.